#pragma once
#include <thread>
#include <QtWidgets/QMainWindow>
#include "ui_sdl_qt_rgb.h"

class SDL_Qt_RGB : public QMainWindow
{
    Q_OBJECT

public:
    SDL_Qt_RGB(QWidget *parent = nullptr);
    ~SDL_Qt_RGB()
    {
        is_exit_ = true;
        th_.join();
    }

    void Main();
    void timerEvent(QTimerEvent* ev) override;
    void resizeEvent(QResizeEvent* ev) override;

signals:
    void ViewS();
public slots:
    void View();
    void open1();
    void open2();
    void open(int i);
private:
    bool is_exit_ = false;
    Ui::SDL_Qt_RGBClass ui;
    std::thread th_;
};
